﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SARUserControls.ChangJingCanshu.DialogPages
{
    public class Transformer6 : TransformerBase
    {
        #region TransformerBase Members

        public float[] transformAttributes(IDictionary<string, object> values)
        {
            float[] result = new float[8];
            float Radicus = float.Parse(values["xidaotiyuanzhubanjing"].ToString());
            float Length = float.Parse(values["xidaotiyuanzhuchangdu"].ToString());
            float Alpha = float.Parse(values["yushuipingzhoujiajiao"].ToString());
            float K = 1;

            result[0] = (float)(Math.Pow(K, 2) * Math.Pow(Length, 3) * Math.Pow(Math.Cos(Alpha), 2) / 3 / (Math.Log(4 * Length / Radicus) - 1));
            result[1] = 0;
            result[2] = (float)(Math.Pow(K, 2) * Math.Pow(Length, 3) * Math.Cos(Alpha) * Math.Sin(Alpha) / 3 / (Math.Log(4 * Length / Radicus) - 1));
            result[3] = 0;
            result[4] = (float)(Math.Pow(K, 2) * Math.Pow(Length, 3) * Math.Cos(Alpha) * Math.Sin(Alpha) / 3 / (Math.Log(4 * Length / Radicus) - 1));
            result[5] = 0;
            result[6] = (float)(Math.Pow(K, 2) * Math.Pow(Length, 3) * Math.Pow(Math.Sin(Alpha), 2) / 3 / (Math.Log(4 * Length / Radicus) - 1));
            result[7] = 0;

            return result;
        }

        #endregion
    }
}
